package ca.ericslandry.shared.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class MapDisplayEvent extends GwtEvent<MapDisplayEvent.Handler> {
	public interface Handler extends EventHandler {
		void show(MapDisplayEvent event);
	}

	public static Type<MapDisplayEvent.Handler> TYPE = new Type<MapDisplayEvent.Handler>();
	private String address;
	public MapDisplayEvent(String address) {
		this.address = address;
	}

	@Override
	protected void dispatch(MapDisplayEvent.Handler handler) {
		handler.show(this);
	}

	@Override
	public Type<MapDisplayEvent.Handler> getAssociatedType() {
		return TYPE;
	}

	public String getAddress() {
		return address;
	}
}
